﻿<phone:PhoneApplicationPage 
    x:Class="Sinergija13.WP7App.Views.MainView"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:phone="clr-namespace:Microsoft.Phone.Controls;assembly=Microsoft.Phone"
    xmlns:shell="clr-namespace:Microsoft.Phone.Shell;assembly=Microsoft.Phone"
    xmlns:controls="clr-namespace:Microsoft.Phone.Controls;assembly=Microsoft.Phone.Controls"
    xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
    xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" 
    xmlns:i="clr-namespace:System.Windows.Interactivity;assembly=System.Windows.Interactivity" 
    xmlns:b="clr-namespace:Sinergija13.WP7App.Infrastructure.Behaviours"
    xmlns:prismInteractivity="clr-namespace:Microsoft.Practices.Prism.Interactivity;assembly=Microsoft.Practices.Prism.Interactivity"
    xmlns:toolkit="clr-namespace:Microsoft.Phone.Controls;assembly=Microsoft.Phone.Controls.Toolkit" 
    xmlns:prismInteractionRequest="clr-namespace:Microsoft.Practices.Prism.Interactivity.InteractionRequest;assembly=Microsoft.Practices.Prism.Interactivity"
    mc:Ignorable="d" d:DesignWidth="480" d:DesignHeight="800"
    SupportedOrientations="Portrait"  Orientation="Portrait"
    shell:SystemTray.IsVisible="False"
    
    FontFamily="{StaticResource PhoneFontFamilyNormal}"
    FontSize="{StaticResource PhoneFontSizeNormal}"
    Foreground="White"
    
    Style="{StaticResource TransitionPageStyle}"
    
    DataContext="{Binding Source={StaticResource ViewModelLocator}, Path=MainViewModel}"
    
    toolkit:TiltEffect.IsTiltEnabled="True"
    >

    <phone:PhoneApplicationPage.Resources>
        <!-- TEMPLATES BEGIN -->

        <DataTemplate x:Key="MyItemHeaderTemplate">
            <Grid>
                <ContentPresenter>
                    <TextBlock Text="{Binding}" FontSize="20" />
                </ContentPresenter>
            </Grid>
        </DataTemplate>

        <DataTemplate x:Key="TrackItemTemplate">
            <Grid Width="360" Height="160" Margin="0,0,0,10">
                <Grid.Background>
                    <SolidColorBrush Color="{Binding BackgroundColor}"/>
                </Grid.Background>
                <Grid.ColumnDefinitions>
                    <ColumnDefinition Width="Auto"/>
                    <ColumnDefinition Width="*"/>
                    <ColumnDefinition Width="3*"/>
                </Grid.ColumnDefinitions>
                <Image Grid.Column="0" HorizontalAlignment="Left" VerticalAlignment="Center" Stretch="None" Margin="8,8,8,8">
                    <Image.Source>
                        <BitmapImage UriSource="{Binding ImageUri}" />
                    </Image.Source>
                </Image>
                <StackPanel Grid.Column="1" Orientation="Vertical" VerticalAlignment="Center" HorizontalAlignment="Center">
                    <TextBlock Text="{Binding Code[0]}" TextAlignment="Center" FontFamily="{StaticResource PhoneFontFamilySemiBold}" Foreground="White" FontSize="30"/>
                    <TextBlock Text="{Binding Code[1]}" TextAlignment="Center" FontFamily="{StaticResource PhoneFontFamilySemiBold}" Foreground="White" FontSize="30"/>
                    <TextBlock Text="{Binding Code[2]}" TextAlignment="Center" FontFamily="{StaticResource PhoneFontFamilySemiBold}" Foreground="White" FontSize="30"/>
                </StackPanel>
                <TextBlock Grid.Column="2" Text="{Binding Title}" 
                           VerticalAlignment="Center" HorizontalAlignment="Right" TextAlignment="Center" FontFamily ="{StaticResource PhoneFontFamilySemiBold}" Foreground="White" TextWrapping="Wrap" Margin="8,8,20,8"/>

                <i:Interaction.Triggers>
                    <i:EventTrigger EventName="Tap">
                        <i:InvokeCommandAction Command="{Binding DataContext.TrackSelectedCommand, ElementName=tracks}" CommandParameter="{Binding}"/>
                    </i:EventTrigger>
                </i:Interaction.Triggers>
            </Grid>
        </DataTemplate>

        <DataTemplate x:Key="TweetItemTemplate">
            <StackPanel Orientation="Horizontal" Height="Auto" Margin="8,0,8,20">
                <StackPanel.Projection>
                    <PlaneProjection RotationX="-90" />
                </StackPanel.Projection>
                <i:Interaction.Behaviors>
                    <b:InsertBehaviour/>
                    <b:MouseLeaveBehaviour/>
                    <b:MouseEnterBehaviour/>
                </i:Interaction.Behaviors>
                <Image Height="73" Width="73" VerticalAlignment="Top" Margin="0,10,8,0">
                    <Image.Source>
                        <BitmapImage UriSource="{Binding User.ImageUrl}" 
                                     CreateOptions="BackgroundCreation"/>
                    </Image.Source>
                </Image>
                <StackPanel Width="324">
                    <Grid Margin="0,0,0,5">
                        <Grid.ColumnDefinitions>
                            <ColumnDefinition Width="Auto"/>
                            <ColumnDefinition Width="*"/>
                        </Grid.ColumnDefinitions>
                        <TextBlock Grid.Column="0" Text="{Binding User.ScreenName}" FontSize="30" Foreground="#FF0071c5" />
                        <TextBlock Grid.Column="1" Text="{Binding Since}" HorizontalAlignment="Right" VerticalAlignment="Center" Foreground="#FF0071c5" Style="{StaticResource PhoneTextSubtleStyle}" Margin="0,0,0,-3"/>
                    </Grid>
                    <TextBlock Text="{Binding Text}" TextWrapping="Wrap" FontSize="24" Foreground="#FF000000">
                        <i:Interaction.Triggers>
                            <i:EventTrigger EventName="Tap">
                                <i:InvokeCommandAction Command="{Binding DataContext.TweetSelectedCommand, ElementName=tweets}" CommandParameter="{Binding}"/>
                            </i:EventTrigger>
                        </i:Interaction.Triggers>
                    </TextBlock>
                </StackPanel>
            </StackPanel>
        </DataTemplate>

        <DataTemplate x:Key="eventItemTemplate">
            <StackPanel>
                <StackPanel.Projection>
                    <PlaneProjection RotationX="-90" />
                </StackPanel.Projection>
                <i:Interaction.Behaviors>
                    <b:InsertBehaviour/>
                </i:Interaction.Behaviors>
                <Grid Width="330" Height="160" Background="#aafbb812">
                    <TextBlock Margin="10,5,0,0" Foreground="White"
                            Text="{Binding NameUppercase}" HorizontalAlignment="Left" FontFamily ="{StaticResource PhoneFontFamilySemiBold}"/>
                    <StackPanel Orientation="Vertical" VerticalAlignment="Bottom">
                        <TextBlock Foreground="White" Margin="10,0,0,5"
                            Text="{Binding Place}" HorizontalAlignment="Left" FontFamily ="{StaticResource PhoneFontFamilyLight}"/>
                        <TextBlock Foreground="White" Margin="10,-5,0,5"
                            Text="{Binding TimeSpanStringShort}" VerticalAlignment="Bottom" HorizontalAlignment="Left" FontFamily ="{StaticResource PhoneFontFamilySemiBold}"/>
                    </StackPanel>
                </Grid>
            </StackPanel>
        </DataTemplate>
        
        <!-- TEMPLATES END -->
    </phone:PhoneApplicationPage.Resources>

    <!--LayoutRoot contains the root grid where all other page content is placed-->
    <Grid x:Name="LayoutRoot" Canvas.ZIndex="0">

        <toolkit:PerformanceProgressBar Canvas.ZIndex="1" Foreground="White" VerticalAlignment="Top" Visibility="{Binding IsSynchronizing, Converter={StaticResource VisibilityConverter}}" IsIndeterminate="{Binding IsSynchronizing}"/>

        <controls:Panorama Name="panorama" Grid.Row="1" Foreground="#FF737373">
            <controls:Panorama.Title>
                <StackPanel Orientation="Horizontal">
                    <TextBlock Text="sinergija" Margin="0,10,0,0" Foreground="#aaffffff"/>
                    <Image Source="../Resources/Images/13.png" Margin="60,75,0,0"/>
                    <Image Source="../Resources/Images/user.png" Margin="60,75,0,0"/>
                    <Image Source="../Resources/Images/windows.png" Margin="60,75,0,0"/>
                </StackPanel>
            </controls:Panorama.Title>
            <controls:Panorama.Background>
                <ImageBrush ImageSource="../Background.jpg"/>
            </controls:Panorama.Background>

            <i:Interaction.Behaviors>
                <b:BindablePanoramaBehaviour TargetIndex="{Binding SelectedPanoramaIndex, Mode=TwoWay}" />
            </i:Interaction.Behaviors>

            <!--Panorama item one-->
            <controls:PanoramaItem Header="info" Margin="0,-20,0,0" Foreground="#ffffffff">
                <Grid Margin="0,-2,0,0">
                    <Grid.RowDefinitions>
                        <RowDefinition Height="Auto"/>
                        <RowDefinition Height="*"/>
                    </Grid.RowDefinitions>
                    <StackPanel Orientation="Vertical" Grid.Row="0" VerticalAlignment="Bottom">
                        <StackPanel Orientation="Vertical" VerticalAlignment="Center" Visibility="{Binding HasSinergijaStarted, Mode=TwoWay, Converter={StaticResource NegativeVisibilityConverter}}">
                            <Grid Width="330" Height="75" HorizontalAlignment="Left" Margin="0,0,0,10">
                                <TextBlock Foreground="White" VerticalAlignment="Center"
                                Text="Do Sinergije 13 ostalo je:" Margin="10,0,0,-30" FontSize="28" FontFamily ="{StaticResource PhoneFontFamilyNormal}"/>
                            </Grid>
                            <StackPanel Grid.Row="1" Orientation="Horizontal">
                                <Image Source="../ApplicationIcon.png" Width="75" Height="75" Margin="0,0,10,10"/>
                                <Grid Width="75" Height="75" Background="#aaef5124" Margin="0,0,10,10">
                                    <TextBlock Margin="0,0,0,5" Foreground="White" VerticalAlignment="Bottom" HorizontalAlignment="Center"
                                Text="{Binding DaysText}" Style="{StaticResource PhoneTextSubtleStyle}" FontSize="15"/>
                                    <TextBlock Foreground="White" VerticalAlignment="Top" HorizontalAlignment="Center" Margin="0,5,0,0"
                                Text="{Binding DaysLeft}" FontSize="35"/>
                                </Grid>
                                <Grid Width="75" Height="75" Background="#aaef5124" Margin="0,0,10,10">
                                    <TextBlock Margin="0,0,0,5" Foreground="White" VerticalAlignment="Bottom" HorizontalAlignment="Center"
                                Text="{Binding HoursText}" Style="{StaticResource PhoneTextSubtleStyle}" FontSize="15"/>
                                    <TextBlock Foreground="White" VerticalAlignment="Top" HorizontalAlignment="Center" Margin="0,5,0,0"
                                Text="{Binding HoursLeft}" FontSize="35"/>
                                </Grid>

                                <Grid Width="75" Height="75" Background="#aaef5124" Margin="0,0,10,10">
                                    <TextBlock Margin="0,0,0,5" Foreground="White" VerticalAlignment="Bottom" HorizontalAlignment="Center"
                                Text="{Binding MinutesText}" Style="{StaticResource PhoneTextSubtleStyle}" FontSize="15"/>
                                    <TextBlock Foreground="White" VerticalAlignment="Top" HorizontalAlignment="Center" Margin="0,5,0,0"
                                Text="{Binding MinutesLeft}" FontSize="35"/>
                                </Grid>
                            </StackPanel>
                        </StackPanel>

                        <ListBox HorizontalAlignment="Left"
                             ItemTemplate="{StaticResource eventItemTemplate}" 
                             ItemsSource="{Binding CurrentEvent}" 
                             ScrollViewer.VerticalScrollBarVisibility="Disabled" 
                             ScrollViewer.HorizontalScrollBarVisibility="Disabled"
                             Visibility="{Binding EventVisible, Mode=TwoWay, Converter={StaticResource VisibilityConverter}}">
                            <ListBox.ItemsPanel>
                                <ItemsPanelTemplate>
                                    <toolkit:WrapPanel Orientation="Vertical"/>
                                </ItemsPanelTemplate>
                            </ListBox.ItemsPanel>

                            <i:Interaction.Triggers>
                                <i:EventTrigger EventName="Tap">
                                    <i:InvokeCommandAction Command="{Binding EventInfoViewCommand}"/>
                                </i:EventTrigger>
                            </i:Interaction.Triggers>
                        </ListBox>                        
                    </StackPanel>              
                    <StackPanel Grid.Row="1" Orientation="Vertical" VerticalAlignment="Bottom" Margin="0,-10,0,0">
                        <ListBox ScrollViewer.VerticalScrollBarVisibility="Disabled" ScrollViewer.HorizontalScrollBarVisibility="Disabled">
                            <ListBox.ItemsPanel>
                                <ItemsPanelTemplate>
                                    <toolkit:WrapPanel Orientation="Horizontal"/>
                                </ItemsPanelTemplate>
                            </ListBox.ItemsPanel>
                            <ListBoxItem Margin="0,0,10,10">
                                <Grid Width="160" Height="160" Background="#aaef5124">
                                    <Image Margin="0,10,0,0" Height="50" Source="/Resources/Icons/SinergijaInfo.png" VerticalAlignment="Center" HorizontalAlignment="Center"/>
                                    <TextBlock Margin="10,5,0,0" Foreground="White"
                                Text="EVENT INFO" HorizontalAlignment="Left" FontFamily ="{StaticResource PhoneFontFamilySemiBold}"/>
                                    <i:Interaction.Triggers>
                                        <i:EventTrigger EventName="Tap">
                                            <i:InvokeCommandAction Command="{Binding ConfInfoViewCommand}"/>
                                        </i:EventTrigger>
                                    </i:Interaction.Triggers>
                                </Grid>
                            </ListBoxItem>
                            <ListBoxItem Margin="0,0,10,10">
                                <Grid Width="160" Height="160" Background="#aaef5124">
                                    <Image Margin="0,10,0,0" Height="50" Source="/Resources/Icons/AppInfo.png" VerticalAlignment="Center" HorizontalAlignment="Center"/>
                                    <TextBlock Margin="10,5,0,0" Foreground="White"
                                Text="APP INFO" HorizontalAlignment="Left" FontFamily ="{StaticResource PhoneFontFamilySemiBold}"/>
                                    <i:Interaction.Triggers>
                                        <i:EventTrigger EventName="Tap">
                                            <i:InvokeCommandAction Command="{Binding AboutAppCommand}"/>
                                        </i:EventTrigger>
                                    </i:Interaction.Triggers>
                                </Grid>
                            </ListBoxItem>
                        </ListBox>
                    </StackPanel>
                </Grid>
                <!--<Grid>
                    <Grid.RowDefinitions>
                        <RowDefinition Height="Auto"/>
                        <RowDefinition Height="*"/>
                        <RowDefinition Height="*"/>
                    </Grid.RowDefinitions>
                    <StackPanel Orientation="Vertical" Grid.Row="0">
                        <TextBlock Text="Sinergija 13 počinje za:" Margin="10,0,0,0" Foreground="#FF737373" FontFamily ="{StaticResource PhoneFontFamilyNormal}" FontSize="40"/>
                        <StackPanel Orientation="Horizontal">
                            <StackPanel Orientation="Vertical" HorizontalAlignment="Center" Margin="0,0,20,0">
                                <TextBlock Text="{Binding DaysLeft}" Margin="10,0,0,0" Foreground="#FF737373" FontFamily ="{StaticResource PhoneFontFamilyNormal}" FontSize="60" TextAlignment="Center"/>
                                <TextBlock Text="{Binding DaysText}" Margin="10,0,0,0" Foreground="#FF737373" FontFamily ="{StaticResource PhoneFontFamilyNormal}" FontSize="20" TextAlignment="Center"/>
                            </StackPanel>
                            <StackPanel Orientation="Vertical" HorizontalAlignment="Center" Margin="0,0,20,0">
                                <TextBlock Text="{Binding HoursLeft}" Margin="10,0,0,0" Foreground="#FF737373" FontFamily ="{StaticResource PhoneFontFamilyNormal}" FontSize="60" TextAlignment="Center"/>
                                <TextBlock Text="{Binding HoursText}" Margin="10,0,0,0" Foreground="#FF737373" FontFamily ="{StaticResource PhoneFontFamilyNormal}" FontSize="20" TextAlignment="Center"/>
                            </StackPanel>
                            <StackPanel Orientation="Vertical" HorizontalAlignment="Center">
                                <TextBlock Text="{Binding MinutesLeft}" Margin="10,0,0,0" Foreground="#FF737373" FontFamily ="{StaticResource PhoneFontFamilyNormal}" FontSize="60" TextAlignment="Center"/>
                                <TextBlock Text="{Binding MinutesText}" Margin="10,0,0,0" Foreground="#FF737373" FontFamily ="{StaticResource PhoneFontFamilyNormal}" FontSize="20" TextAlignment="Center"/>
                            </StackPanel>
                        </StackPanel>
                    </StackPanel>

                    <StackPanel Orientation="Vertical" Grid.Row="2">
                        <HyperlinkButton Grid.Row="1" Content="event info" NavigateUri="/Views/TrackListView.xaml" Style="{StaticResource PhoneHyperlinkMenuStyle}" Foreground="#ffef5124" FontFamily ="{StaticResource PhoneFontFamilyNormal}" FontSize="40"/>
                        <HyperlinkButton Grid.Row="2" Content="o aplikaciji" NavigateUri="/Views/TrackListView.xaml" Style="{StaticResource PhoneHyperlinkMenuStyle}" Foreground="#ffef5124" FontFamily ="{StaticResource PhoneFontFamilyNormal}" FontSize="40"/>
                    </StackPanel>               
                </Grid>-->
            </controls:PanoramaItem>

            <!--Panorama item two-->
            <controls:PanoramaItem Margin="0,-20,0,0" Header="agenda" Foreground="#FFffffff">
                <StackPanel Orientation="Vertical" VerticalAlignment="Bottom">
                    <!--<StackPanel Orientation="Vertical">
                        <TextBlock Text="sledi..." Margin="10,0,0,0" Foreground="White" FontFamily ="{StaticResource PhoneFontFamilyNormal}" FontSize="40"/>
                        <TextBlock Text="Keynote 1" Margin="10,0,0,5" Foreground="White" FontFamily ="{StaticResource PhoneFontFamilyNormal}" FontSize="40"/>
                        <TextBlock Text="pon 20h main hall SRB" Margin="10,0,0,20" Foreground="White" FontFamily ="{StaticResource PhoneFontFamilyNormal}" FontSize="20"/>
                    </StackPanel>-->
                    <ListBox ScrollViewer.VerticalScrollBarVisibility="Disabled" ScrollViewer.HorizontalScrollBarVisibility="Disabled">
                        <ListBox.ItemsPanel>
                            <ItemsPanelTemplate>
                                <toolkit:WrapPanel Orientation="Horizontal"/>
                            </ItemsPanelTemplate>
                        </ListBox.ItemsPanel>
                        <ListBoxItem Margin="0,0,10,10">
                            <Grid Width="160" Height="160" Background="#aaef5124">
                                <TextBlock Margin="10,5,0,0" Foreground="White"
                            Text="UTORAK" HorizontalAlignment="Left" FontFamily ="{StaticResource PhoneFontFamilySemiBold}"/>
                                <StackPanel Orientation="Vertical" VerticalAlignment="Bottom">
                                    <TextBlock Foreground="White" Margin="10,0,0,5"
                            Text="Tehnički Dan" HorizontalAlignment="Left" FontFamily ="{StaticResource PhoneFontFamilyLight}"/>
                                    <TextBlock Foreground="White" Margin="10,-5,0,5"
                            Text="22. okt." VerticalAlignment="Bottom" HorizontalAlignment="Left" FontFamily ="{StaticResource PhoneFontFamilySemiBold}"/>
                                </StackPanel>
                                <i:Interaction.Triggers>
                                    <i:EventTrigger EventName="Tap">
                                        <i:InvokeCommandAction Command="{Binding FirstDayViewCommand}"/>
                                    </i:EventTrigger>
                                </i:Interaction.Triggers>
                            </Grid>
                        </ListBoxItem>
                        <ListBoxItem Margin="0,0,10,10">
                            <Grid Width="160" Height="160" Background="#aa7eb941">
                                <TextBlock Margin="10,5,0,0" Foreground="White"
                            Text="SREDA" HorizontalAlignment="Left" FontFamily ="{StaticResource PhoneFontFamilySemiBold}"/>
                                <StackPanel Orientation="Vertical" VerticalAlignment="Bottom">
                                    <TextBlock Foreground="White" Margin="10,0,0,5"
                            Text="Tehnički Dan" HorizontalAlignment="Left" FontFamily ="{StaticResource PhoneFontFamilyLight}"/>
                                    <TextBlock Foreground="White" Margin="10,-5,0,5"
                            Text="23. okt." VerticalAlignment="Bottom" HorizontalAlignment="Left" FontFamily ="{StaticResource PhoneFontFamilySemiBold}"/>
                                </StackPanel>
                                <i:Interaction.Triggers>
                                    <i:EventTrigger EventName="Tap">
                                        <i:InvokeCommandAction Command="{Binding SecondDayViewCommand}"/>
                                    </i:EventTrigger>
                                </i:Interaction.Triggers>
                            </Grid>
                        </ListBoxItem>
                        <ListBoxItem Margin="0,0,10,10">
                            <Grid Width="160" Height="160" Background="#aa329fd8">
                                <Image Margin="0,10,0,0" Height="50" Source="/Resources/Icons/Predavaci.png" VerticalAlignment="Center" HorizontalAlignment="Center"/>
                                <TextBlock Margin="10,5,0,0" Foreground="White"
                            Text="Predavači" HorizontalAlignment="Left" FontFamily ="{StaticResource PhoneFontFamilySemiBold}"/>
                                <i:Interaction.Triggers>
                                    <i:EventTrigger EventName="Tap">
                                        <i:InvokeCommandAction Command="{Binding SpeakerListViewCommand}"/>
                                    </i:EventTrigger>
                                </i:Interaction.Triggers>
                            </Grid>
                        </ListBoxItem>
                        <ListBoxItem Margin="0,0,10,10">
                            <Grid Width="160" Height="160" Background="#aafbb812">
                                <TextBlock Margin="10,5,0,0" Foreground="White"
                            Text="Odabrano" HorizontalAlignment="Left" FontFamily ="{StaticResource PhoneFontFamilySemiBold}"/>
                                <TextBlock Text="&#x2665;" Foreground="#ffffffff" FontSize="70" FontFamily="Segoe UI Symbol" TextAlignment="Center"
                                           VerticalAlignment="Center" HorizontalAlignment="Center"
                                           Visibility="{Binding HasFavourites, Converter={StaticResource VisibilityConverter}}"/>
                                <TextBlock Text="&#x2661;" Foreground="#ffffffff" FontSize="70" FontFamily="Segoe UI Symbol" TextAlignment="Center"
                                           VerticalAlignment="Center" HorizontalAlignment="Center"
                                           Visibility="{Binding HasFavourites, Converter={StaticResource NegativeVisibilityConverter}}"/>
                                <i:Interaction.Triggers>
                                    <i:EventTrigger EventName="Tap">
                                        <i:InvokeCommandAction Command="{Binding FavouritesViewCommand}"/>
                                    </i:EventTrigger>
                                </i:Interaction.Triggers>
                            </Grid>
                        </ListBoxItem>
                    </ListBox>
                </StackPanel>
            </controls:PanoramaItem>

            <!--Panorama item one-->
            <controls:PanoramaItem Header="sesije" Margin="0,-20,0,0" Foreground="#ffffffff">
                <Grid>
                    <ListBox
                        x:Name="tracks"
                        ItemsSource="{Binding Tracks}"
                        ItemTemplate="{StaticResource TrackItemTemplate}"
                        ItemContainerStyle="{StaticResource ListBoxItemStyleNoSelectedColor}">
                    </ListBox>
                </Grid>
            </controls:PanoramaItem>

            <!--Panorama item two-->
            <controls:PanoramaItem Foreground="#FFffffff">
                <controls:PanoramaItem.Header>
                    <Grid>
                        <Grid.ColumnDefinitions>
                            <ColumnDefinition Width="Auto"/>
                            <ColumnDefinition Width="*"/>
                            <ColumnDefinition Width="*"/>
                        </Grid.ColumnDefinitions>
                        <TextBlock Text="social " Margin="0,-20,0,0" FontSize="72" Grid.Column="0"/>
                        <Button Style="{StaticResource ButtonPressedNoBackground}" Grid.Column="1" BorderThickness="0" Height="80" Width="80" BorderBrush="Transparent" Margin="20,0,0,0">
                            <Button.Content>
                                <Image Source="/Resources/Icons/feature.settings.png" Height="64" Width="64" HorizontalAlignment="Center" VerticalAlignment="Center"/>
                            </Button.Content>
                            <i:Interaction.Triggers>
                                <i:EventTrigger EventName="Tap">
                                    <i:InvokeCommandAction Command="{Binding TwitterSettingsViewCommand}"/>
                                </i:EventTrigger>
                            </i:Interaction.Triggers>
                        </Button>
                        <Button Style="{StaticResource ButtonPressedNoBackground}" Grid.Column="2" BorderThickness="0" Height="80" Width="80"  BorderBrush="Transparent" Margin="20,0,0,0">
                            <Button.Content>
                                <Image Source="/Resources/Icons/feature.sync.png" Height="58" Width="58" HorizontalAlignment="Center" VerticalAlignment="Center"/>
                            </Button.Content>
                            <i:Interaction.Triggers>
                                <i:EventTrigger EventName="Tap">
                                    <i:InvokeCommandAction Command="{Binding GetNewTweetsCommand}"/>
                                </i:EventTrigger>
                            </i:Interaction.Triggers>
                        </Button>
                    </Grid>
                </controls:PanoramaItem.Header>
                <Grid>
                    <Grid Background="#44000000" VerticalAlignment="Top" Margin="0,20,0,0" HorizontalAlignment="Center">
                        <Button Style="{StaticResource ButtonPressedNoBackground}" Grid.Column="1" BorderThickness="0"  BorderBrush="Transparent"  VerticalAlignment="Top"
                            Visibility="{Binding HasTweets, Mode=TwoWay, Converter={StaticResource NegativeVisibilityConverter}}">
                            <TextBlock FontSize="32" FontFamily="Segoe UI Symbol" Text="&#x1f503; Osvežite tweet-ove" TextWrapping="Wrap"/>
                            <i:Interaction.Triggers>
                                <i:EventTrigger EventName="Tap">
                                    <i:InvokeCommandAction Command="{Binding GetNewTweetsCommand}"/>
                                </i:EventTrigger>
                            </i:Interaction.Triggers>
                        </Button>
                    </Grid>

                    <ScrollViewer Padding="0,0,-20,0" Visibility="{Binding HasTweets, Mode=TwoWay, Converter={StaticResource VisibilityConverter}}">
                        <ScrollViewer.Background>
                            <LinearGradientBrush EndPoint="0.5,1" StartPoint="0.5,0">
                                <GradientStop Color="#00FFFFFF" Offset="0" />
                                <GradientStop Color="#99FFFFFF" Offset="0.100" />
                            </LinearGradientBrush>
                        </ScrollViewer.Background>
                        <StackPanel Orientation="Vertical">
                            <ItemsControl
                            x:Name="tweets"
                            ItemsSource="{Binding Tweets}"
                            ItemTemplate="{StaticResource TweetItemTemplate}"/>
                            <!--ItemContainerStyle="{StaticResource ListBoxItemStyleNoSelectedColor}"-->
                            <Button Width="100" BorderThickness="0,0,0,0" BorderBrush="#FFFFFFFF" Foreground="#FFFFFFFF" Style="{StaticResource ButtonPressedNoBackground}">
                                <i:Interaction.Triggers>
                                    <i:EventTrigger EventName="Tap">
                                        <i:InvokeCommandAction Command="{Binding GetOlderTweetsCommand}"/>
                                    </i:EventTrigger>
                                </i:Interaction.Triggers>
                                <StackPanel Orientation="Vertical">
                                    <Image Source="/Resources/Icons/feature.sync.png" Height="54" Width="54"/>
                                    <TextBlock Text="Učitaj starije tweet-ove" FontSize="10" TextWrapping="Wrap" TextAlignment="Center"/>
                                </StackPanel>
                            </Button>
                        </StackPanel>
                    </ScrollViewer>
                </Grid>
            </controls:PanoramaItem>
        </controls:Panorama>

        <Popup x:Name="NewConfDataPopup">
            <Grid x:Name="grid" Background="{StaticResource PhoneAccentBrush}" 
                VerticalAlignment="Bottom" Width="480" Height="50">
                <TextBlock Text="Agenda je osvežena." 
                    HorizontalAlignment="Stretch" VerticalAlignment="Center"
                    Foreground="{StaticResource PhoneForegroundBrush}" 
                    TextWrapping="Wrap" Margin="14,5,14,5">
                    <i:Interaction.Behaviors>
                        <b:PopupHideOnLeftMouseUp/>
                     </i:Interaction.Behaviors>
                </TextBlock>
            </Grid>
        </Popup>
    </Grid>

    <i:Interaction.Triggers>

        <i:EventTrigger SourceObject="{Binding InternetNotPresentInteractionRequest}" EventName="Raised">
            <prismInteractionRequest:MessageBoxAction/>
        </i:EventTrigger>

        <i:EventTrigger SourceObject="{Binding AboutAppInteractionRequest}" EventName="Raised">
            <prismInteractionRequest:MessageBoxAction/>
        </i:EventTrigger>

        <i:EventTrigger SourceObject="{Binding ConfErrorInteractionRequest}" EventName="Raised">
            <prismInteractionRequest:MessageBoxAction/>
        </i:EventTrigger>

        <i:EventTrigger SourceObject="{Binding TwitterErrorInteractionRequest}" EventName="Raised">
            <prismInteractionRequest:MessageBoxAction/>
        </i:EventTrigger>

        <i:EventTrigger SourceObject="{Binding NewConfDataInteractionRequest}" EventName="Raised">
            <prismInteractionRequest:ToastPopupAction PopupElementName="NewConfDataPopup" IsEnabled="True"/>
        </i:EventTrigger>

    </i:Interaction.Triggers>
    <!--Panorama-based applications should not show an ApplicationBar-->

</phone:PhoneApplicationPage>